package com.sgcc.configclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @BelongsProject: springcloud
 * @BelongsPackage: com.sgcc.configclient.controller
 * @Author: LiMengshuai
 * @CreateTime: 2019-07-30 11:31
 * @Description: ${Description}
 */
@RestController
public class Controller {

    @Value("${spring.application.name}")
    private String applicationName;

    @Value("${eureka.client.service-url.defaultZone}")
    private String eurekaServers;

    @Value("${server.port}")
    private String port;

    @RequestMapping("/config")
    public String getConfig() {
        String str = "applicationName:" + applicationName + "\teurekaServers:" + eurekaServers + "\tport:" + port;
        System.out.println(str);
        return str;
    }
}
